Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Read  a  Comma  Separated  Values  Log  

 Content of Read a Comma Separated Values Log.vbs
MD5 Hash: 65126BC8297A8048D5DEE2C8CD69D868
' Description: Extracts the information in the DHCP Server log to individual fields and records.


Const ForReading = 1

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("C:\Windows\System32\DHCP\" _
& "DhcpSrvLog-Mon.log", ForReading)

Do While objTextFile.AtEndOfStream <> True
If inStr(objtextFile.Readline, ",") Then
arrDHCPRecord = split(objTextFile.Readline, ",")
Wscript.Echo "Event ID: " & arrDHCPRecord(0)
Wscript.Echo "Date: " & arrDHCPRecord(1)
Wscript.Echo "Time: " & arrDHCPRecord(2)
Wscript.Echo "Description: " & arrDHCPRecord(3)
Wscript.Echo "IP Address: " & arrDHCPRecord(4)
Wscript.Echo "Host Name: " & arrDHCPRecord(5)
Wscript.Echo "MAC Address: " & arrDHCPRecord(6)
Else
objTextFile.Skipline
End If
i = i + 1
Loop

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a